package com.atguigu.gulimall.product.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ZZMaintainService {

    @Autowired
    private SpuInfoDescService spuInfoDescService;
    @Autowired
    SkuInfoService skuInfoService;

    @Autowired
    ProductAttrValueService productAttrValueService;
    @Autowired
    SpuInfoService spuInfoService;


    @Transactional
    public void deleteSpu(Long id) {
        spuInfoService.removeById(id);
        spuInfoDescService.removeById(id);
        productAttrValueService.deletebyspuid(id);
        skuInfoService.deleteBySpuid(id);
    }
}


